﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SignIn
{
    public partial class Form2 : Form
    {
        public string file;
        public string signCode;
        public Form2()
        {
            InitializeComponent();
        }

        private void Form2_Load(object sender, EventArgs e)
        {
            Image img =new Bitmap(file);//参数是路径（支持相对路径和绝对路径）
            pictureBox1.Image = img;
            textBox1.Focus();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == "")
                return;
            signCode = textBox1.Text;
            this.DialogResult = DialogResult.OK;
        }

        private void Form2_FormClosing(object sender, FormClosingEventArgs e)
        {
            pictureBox1.Image = null;
        }
    }
}
